function eqArray(arr1, arr2) {
    if (!(arr1 instanceof Array) || !(arr2 instanceof Array)) {
        return false;
    }
    if (arr1.length != arr2.length) {
        return false;
    }
    for (var i = 0; i < arr1.length; i++) {
        if (arr1[i] != arr2[i]) {
           return false;
        }
    }
    return true;
}


function eqArrayEle(arr1, arr2) {
    if (!(arr1 instanceof Array) || !(arr2 instanceof Array)) {
        return false;
    }
    if (arr1.length != arr2.length) {
        return false;
    }
    for (var i = 0; i < arr1.length; i++) {
        let index = arr2.indexOf(arr1[i]);
        if(index <0){
            return false;
        }else{
            arr2 = arr2.filter((ele)=>{ return ele!== arr1[i]})
        }
    }
    return true;
}

function eqObject(o1,o2) {
    const o1Keys = Object.keys(o1)
    const o2Keys = Object.keys(o2)
    if(o1Keys.length!=o2Keys.length){
        return false;
    }
    for (let index=0;index<o1Keys.length;index++){
        const key1 = o1Keys[index];
        const  val1 =  o1[key1];
        const  val2 =  o2[key1];
        if(val1 == val2 ){
            continue;
        }else if(val1 == null || val2==null ){
            return false;
        }
        
        if(typeof val1 === 'object' && !eq(val1,val2)){
            return false;
        }
    } 
    
    return true;
}


function eq(str1, str2) {
   if(str1 === str2){
       return true;
   }
   return false;
}

function getType(data){
    return Object.prototype.toString.call(data);
}